﻿using System;
using System.Collections.Generic;

namespace Model
{
     ///<summary>
     ///实体类CAMERA_INFO
     ///</summary>
     public class CAMERA_INFO
     {
         private int __ID=0 ;
         private string __CameraIP=string.Empty ;
         private string __CameraPort=string.Empty ;
         private string __UserName=string.Empty ;
         private string __UserPwd=string.Empty ;
         private string __LineNum=string.Empty ;
         private bool? __IsEnabled=null ;

         private Dictionary<string, bool> __Changed = new Dictionary<string, bool>();


         public CAMERA_INFO()
         {
             this.__Changed.Add("ID",false);
             this.__Changed.Add("CameraIP",false);
             this.__Changed.Add("CameraPort",false);
             this.__Changed.Add("UserName",false);
             this.__Changed.Add("UserPwd",false);
             this.__Changed.Add("LineNum",false);
             this.__Changed.Add("IsEnabled",false);
         }

         /// <summary>
         /// 将类重置到初始化状态
         /// </summary>
         public void Reset()
         {
             this.__ID =0;
             this.__CameraIP =string.Empty;
             this.__CameraPort =string.Empty;
             this.__UserName =string.Empty;
             this.__UserPwd =string.Empty;
             this.__LineNum =string.Empty;
             this.__IsEnabled =null;
             this.__Changed["ID"] = false;
             this.__Changed["CameraIP"] = false;
             this.__Changed["CameraPort"] = false;
             this.__Changed["UserName"] = false;
             this.__Changed["UserPwd"] = false;
             this.__Changed["LineNum"] = false;
             this.__Changed["IsEnabled"] = false;
         }

         /// <summary>
         /// 获取类中成员的改变状态
         /// </summary>
         public bool Changed(string strKey)
         {
             return __Changed[strKey];
         }

         /// <summary>
         ///设置或获取类中的[ID]的数据
         /// </summary>
         public int ID
         {
              set{ __ID = value; __Changed["ID"] = true;}
              get{return __ID;}
         }
         /// <summary>
         ///设置或获取类中的[CameraIP]的数据
         /// </summary>
         public string CameraIP
         {
              set{ __CameraIP = value.Replace("'","’"); __Changed["CameraIP"] = true;}
              get{return __CameraIP;}
         }
         /// <summary>
         ///设置或获取类中的[CameraPort]的数据
         /// </summary>
         public string CameraPort
         {
              set{ __CameraPort = value.Replace("'","’"); __Changed["CameraPort"] = true;}
              get{return __CameraPort;}
         }
         /// <summary>
         ///设置或获取类中的[UserName]的数据
         /// </summary>
         public string UserName
         {
              set{ __UserName = value.Replace("'","’"); __Changed["UserName"] = true;}
              get{return __UserName;}
         }
         /// <summary>
         ///设置或获取类中的[UserPwd]的数据
         /// </summary>
         public string UserPwd
         {
              set{ __UserPwd = value.Replace("'","’"); __Changed["UserPwd"] = true;}
              get{return __UserPwd;}
         }
         /// <summary>
         ///设置或获取类中的[LineNum]的数据
         /// </summary>
         public string LineNum
         {
              set{ __LineNum = value.Replace("'","’"); __Changed["LineNum"] = true;}
              get{return __LineNum;}
         }
         /// <summary>
         ///设置或获取类中的[IsEnabled]的数据
         /// </summary>
         public bool? IsEnabled
         {
              set{ __IsEnabled = value; __Changed["IsEnabled"] = true;}
              get{return __IsEnabled;}
         }
    }
}
